class game_object(object):
	"""A game object is one that is in the physical game, has to move, and generate collision events when they occur."""
	def __init__(self,actions,senses,object_type,object_num,max_velocity,max_heading_diff,radius,graphics_draw,graphics_die,pos,heading,im_file):
		# Physical Properties
		self.pos=pos
		self.heading=heading
		self.radius=radius
		self.max_velocity=max_velocity
		self.max_heading_diff= max_heading_diff

		# Game Properties
		self.object_type=object_type
		self.object_num=object_num
		self.is_dead=False
		self.time_of_death=0
		self.last_shot=0

		# Object I/O used in thinking
		self.actions=actions
		self.senses=senses

		# Graphics callbacks and state
		self.graphics_draw=graphics_draw
		self.graphics_die=graphics_die
		self.graphics_state=[0] # Used to pass auxilliary info to the graphics_draw function
		self.im_file=im_file
		
		self.fitness_dimensions=5
		self.fitness_vector=0
		
		# WARNING: KEEP AWAY (fitness variables)
		self.first_dist = 0 
		self.final_dist = 0	
		#
		self.clear_fitness_stats()
	def clear_fitness_stats(self):
		self.fitness_vector=[0.0]*self.fitness_dimensions
		self.first_dist=0
		self.final_dist=0
	def think(self):
		"""Called to allow the agent to sense/think/act"""
		return
	def draw(self):
		"""Draws the object using the provided callback function.  This can use member variables to control different frames of animation to be drawn.  The draw function must be able to setup the initial representation aswell as update it."""
		self.graphics_draw(self.object_num,self.pos,self.heading,self.graphics_state,self.im_file)
	def die(self):
		"""Remove the graphical representation of the object"""
		self.graphics_die(self.object_num)
